//
//  Framework for a raytracer
//  File: triangle.h
//
//  Created for the Computer Science course "Introduction Computer Graphics"
//  taught at the University of Groningen by Tobias Isenberg.
//
//  Authors:
//	  Zhe Sun
//
//  This framework is inspired by and uses code of the raytracer framework of 
//  Bert Freudenberg that can be found at
//  http://isgwww.cs.uni-magdeburg.de/graphik/lehre/cg2/projekt/rtprojekt.html 
//

#ifndef __TRIANGLE__
#define __TRIANGLE__

#include "object.h"

class Triangle : public Object
{
public:
    Triangle(Point v1, Point v2, Point v3, Vector n1, Vector n2, Vector n3) : v1(v1), v2(v2), v3(v3), n1(n1), n2(n2), n3(n3){}
    //Triangle(Point v1, Point v2, Point v3) : v1(v1), v2(v2), v3(v3), n(){}
    virtual Hit intersect(const Ray &ray);
    virtual void mapCoord(Point p, double* u, double* v);

    const Point v1;
    const Point v2;
    const Point v3;
    
    Vector n1;
    Vector n2;
    Vector n3;
};

#endif /* end of include guard: SPHERE_H_115209AE */
